//
//  NSString+Common.h
//  WeddingToB
//
//  Created by 蒋柯 on 15/11/9.
//  Copyright © 2015年 ymonke. All rights reserved.
//


#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
//#import "NSString+Emojize.h"

@interface NSString (Common)
//+ (NSString *)userAgentStr;
//
//- (NSString *)URLEncoding;
//- (NSString *)URLDecoding;
- (NSString *)md5Str;
//- (NSString*) sha1Str;
//- (NSURL *)urlWithCodePath;
//- (NSURL *)urlImageWithCodePathResize:(CGFloat)width;
//- (NSURL *)urlImageWithCodePathResize:(CGFloat)width crop:(BOOL)needCrop;
//- (NSURL *)urlImageWithCodePathResizeToView:(UIView *)view;
//
//
//- (NSString *)stringByRemoveHtmlTag;
//
//
//
- (CGSize)getSizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size;
- (CGSize)getSizeWithFont:(UIFont *)font WithLineSpacing:(CGFloat)lineSpacing constrainedToSize:(CGSize)size;
- (CGFloat)getHeightWithFont:(UIFont *)font constrainedToSize:(CGSize)size;
- (CGFloat)getWidthWithFont:(UIFont *)font constrainedToSize:(CGSize)size;
-(BOOL)containsEmoji;

- (NSString *)emotionSpecailName;

- (NSString *)emotionMonkeyName;
//
//+ (NSString *)sizeDisplayWithByte:(CGFloat)sizeOfByte;
//
//- (NSString *)trimWhitespace;
- (BOOL)isEmpty;
////判断是否为整形
//- (BOOL)isPureInt;
////判断是否为浮点形
//- (BOOL)isPureFloat;
//
//- (NSRange)rangeByTrimmingLeftCharactersInSet:(NSCharacterSet *)characterSet;
//- (NSRange)rangeByTrimmingRightCharactersInSet:(NSCharacterSet *)characterSet;
//
//- (NSString *)stringByTrimmingLeftCharactersInSet:(NSCharacterSet *)characterSet;
//- (NSString *)stringByTrimmingRightCharactersInSet:(NSCharacterSet *)characterSet;
//
////转换拼音
//- (NSString *)transformToPinyin;

- (NSString*)replaceOccurrencesOfString;

-(BOOL)boolOnlyOneLinesWithHeight:(CGFloat )height WithLineSpacing:(CGFloat)lineSpacing constrainedToSize:(CGSize)size;

-(NSString *)timeFormatted:(NSString *)totalSeconds;


/**
 手机号验证

 @return <#return value description#>
 */
- (BOOL) isValidMobileNumber;

-(BOOL)isValidateMobile:(NSString *)mobile;


/**
 验证码验证

 @return <#return value description#>
 */
- (BOOL) isValidVerifyCode;

//字典转字符串
+ (NSString *)dictionaryToJSONString:(NSDictionary *)dictionary;

//数组转字符串
+ (NSString *)arrayToJSONString:(NSArray *)array;

@end
